<?php
/**
 * Created by PhpStorm.
 * User: FoxxxZhu
 * Date: 2018/2/6
 * Time: 17:49
 */

namespace Forxx\Api;

use Lavender\Core;
use PayPal\Auth\OAuthTokenCredential;
use PayPal\Rest\ApiContext;

class PayPalPayment {
    private $paypal = null;
    private function __construct(){
        $clientInfo = Core::get_config("const","paypal");
        $this->paypal = new ApiContext(new OAuthTokenCredential($clientInfo['ClientID'],$clientInfo['ClientSecret']));
    }

    public static function instance(){
        return new Static();
    }

    public function payAOrder($orderInfo,$itemInfo,$urls){

    }

    public function notify(){

    }

}